<template>
	<view class="content" v-if="show==1">
		<view class="bottom">
		    <view class="sign_1" v-for="(l,index) in log">
		      <view class="time">
		        <view class="time_1">
					<text class="daishenhe">支付宝：{{l.alipay}}/{{l.name}}</text>
				</view>
		        <view class="time_2">{{l.createtime}}</view>
		      </view>
		      <view class="jifen2" >
				  <view class="jifen3">￥{{l.money}}</view>
				  <view class="jifen4">
					  <!--<view class="jifen5" v-if="l.status==-1" @click="cause" :data-index="index">已驳回<image src="../../static/yy.png" mode="aspectFit"></view>
					  <view class="jifen6" v-if="l.status==1">审核中</view>
					  <view class="jifen7" v-if="l.status==2">已通过</view>-->
				  </view>
			  </view>
		    </view>
		
		</view>
		<view class="kong" v-if="!log[0]">暂无任何记录</view>
	</view>
</template>

<script>
	var app=getApp();
	export default {
		data() {
			return {
				show:0,
				uid:0,
				log:[],
				next:0,
				page:1,
				empty:0
			}
		},
		onLoad() {
			const uid = uni.getStorageSync('uid');
			if(app.isBlank(uid)==true){
				app.error_msg("请先登录");
			}
			this.uid=uid;
			this.getdata();
		},
		methods: {
			getdata(){
				var that=this;
				uni.showLoading({
				    title: '数据加载中'
				});
				uni.request({
				    url: app.globalData.url+"user/withdrawRecord",
					method:"POST",
					dataType:"json",
					header: {
					    'content-type': 'application/x-www-form-urlencoded'
					},
				    data: {uid:that.uid,page:that.page},
				    success: (res) => {
						uni.hideLoading();
						if(res.data.code!=1){
							app.error_msg(res.data.msg);
						}
						that.log=that.log.concat(res.data.data.log)
						that.page++;
						that.show=1;
				    }
				});
			},
			cause(e){
				var index=e.currentTarget.dataset.index;
				var that=this;
				uni.showModal({
				    content: that.log[index].cause,
					showCancel:false,
					confirmText:'我知道啦'
				});
			},
			onReachBottom(){
				if(this.next==1){
					this.next=0;
					this.getdata();
				}
			}
		}
	}
</script>

<style>
	.shibai{width:20px;height:20px;margin-top: 5px;float: left;margin-left: 5px;}
	.weitongguo{color:#ee234e;float: left;}
	.yitongguo{color:#46C706;float: left;}
	.daishenhe{color:#333;float: left;font-weight: 550;}
	.kong{width:100%;text-align: center;margin-top: 30%;}
	.active{border-bottom: 2px #46C706 solid;color:#46C706;}
	.qian2{width:40%;margin:0px 5%;height:30px;line-height: 30px;text-align: center;float: left;}
	.qian1{width:100%;overflow: hidden;}
	.bottom{width:94%;padding: 0px 3%;}
	.sign_1{width:100%;overflow: hidden;padding: 10px 0px;border-bottom: 1px rgb(245, 245, 245) solid;overflow: hidden;}
	.time{width:70%;float: left;height:50px;}
	.jifen2{width:30%;float: left;height:50px;}
	.jifen3{height:25px;width:100%;line-height: 25px;color:rgb(7, 207, 33);font-size: 0.9rem;text-align: right;}
	.jifen4{height:25px;width:100%;line-height: 25px;text-align: right;}
	.jifen5{line-height: 25px;display: inline-block;color:red;}
	.jifen5 image{width:16px;height:16px;margin-top: 5.5px;float: right;margin-left: 3px;}
	.jifen6{line-height: 25px;display: inline-block;color:#4e86ec;}
	.jifen7{line-height: 25px;display: inline-block;color:#1ec802;}
	.time_1{width:100%;height:30px;line-height: 30px;font-size: 0.8rem;color:#666;overflow: hidden;}
	.time_2{width:100%;height:30px;line-height: 20px;color:#999;}
	.red{color:red!important;}
	.top{width:94%;padding: 10px 3%;}
	.top_1{width:100%;height:auto;border-radius: 5px;background-image: linear-gradient(to right, #46c706 , #61e021);}
	.yue{width:94%;padding: 10px 3%;overflow: hidden;}
	.yue_1{width:70%;float: left;}
	.yue_2{width:30%;float: left;text-align: right;margin-top: 13px;}
	.mingcheng{width:100%;height:20px;line-height: 20px;color:#eee;}
	.qian{width:100%;height:35px;line-height: 35px;color:#fff;font-size: 1.5rem;overflow: hidden;}
	.chongzhi{width:80px;height:30px;text-align: center;line-height: 30px;color:#46c706;border-radius:20px;background-color: #fff;float: right;}
	.jilu{width:94%;padding: 10px 3%;overflow: hidden;}
	.ljcz{width:50%;float: left;}
	.ljxf{width:50%;float: left;}
	.ljcz_1{width:100%;height:20px;line-height: 20px;color:#eee;}
	.ljcz_2{width:100%;height:30px;line-height: 30px;color:#fff;font-size: 1.2rem;overflow: hidden;}
	.caidan{width:100%;margin-top:5px;overflow: hidden;margin-bottom: 15px;}
	.caidan_1{width:33.33%;float: left;text-align: center;}
	.caidan_2{width:33.33%;float: left;text-align: center;}
	.caidan_3{width:33.33%;float: left;text-align: center;}
	.caidan_1 image{width:25px;}
	.caidan_2 image{width:25px;}
	.caidan_3 image{width:25px;}
	.ziti{width:100%;text-align: center;height:25px;line-height: 25px;color:#666;font-size: 0.9rem;}
</style>
